package com.bawei.module_mine.api

import com.bawei.lib_common.base.BaseResponse
import com.bawei.module_mine.model.CarOrderModelItem
import com.bawei.module_mine.model.InspectionOrderModelItem
import com.bawei.module_mine.model.NewsModelItem
import com.bawei.module_mine.model.RepairOrderModelItem
import com.bawei.module_mine.model.UserInfoModel
import com.bawei.module_mine.model.VisitOrderModelItem
import com.bawei.module_mine.net.API
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import retrofit2.http.Query

interface MineApi {
    /**
     * 账号密码登录
     */
    @POST(API.LOGIN)
    suspend fun passLogin(@Query("password") password: String,@Query("username") username: String): BaseResponse<UserInfoModel>
    /**
     * 账号密码注册
     */
    @POST(API.REGISTER)
    suspend fun passRegister(@Query("password") password: String,@Query("username") username: String): BaseResponse<UserInfoModel>
    /**
     * 修改密码
     */
    @PUT(API.MODIFY_PASSWORD)
    suspend fun modifyPassword(@Query("newPwd") newPwd: String,@Query("userid") userid: String): BaseResponse<Boolean>
    /**
     * 车位申请
     */
    @GET(API.PARKING_APPLY)
    suspend fun parkingApply(@Path ("areaId") areaId:  Int): BaseResponse<List<CarOrderModelItem>>
    /**
     * 访客申请
     */
    @GET(API.VISIT_APPLY)
    suspend fun visitApply(): BaseResponse<List<VisitOrderModelItem>>
    /**
     * 维修申请
     */
    @GET(API.REPAIR_APPLY)
    suspend fun repairApply(): BaseResponse<List<RepairOrderModelItem>>
    /**
     * 巡更申请
     */
    @GET(API.INSPECTION_APPLY)
    suspend fun inspectionApply(): BaseResponse<List<InspectionOrderModelItem>>
    /**
     * 公告申请
     */
    @GET(API.NEWS_APPLY)
    suspend fun newsApply(): BaseResponse<List<NewsModelItem>>
}